package ioc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component("rest")
public class Restaurant {

	
	@Autowired
	@Qualifier("wt")
	private Waiter waiter;

	public Waiter getWaiter() {
		return waiter;
	}

	
//	@Autowired
//	public void setWaiter(@Qualifier("wt") Waiter waiter) {
//		System.out.println("SetWaiter();");
//		this.waiter = waiter;
//	}

	public Restaurant() {
		System.out.println("Restaurant()");
	}

	@Override
	public String toString() {
		return "Restaurant [waiter=" + waiter + "]";
	}

	
	
	
	
}
